package com.arc.spring.entity;

import lombok.Data;
import lombok.ToString;

import java.util.Date;

/**
 * @Author: YangYunhe
 * @Date: 2024/8/17
 * @Description
 */
@Data
@ToString
public class Person {

    private Integer id;
    private String name;
    private String sex;
    private Date birthDay;

    public Person() {
        System.out.println(this.getClass().getName() + " NoArgsConstructor");
    }

    public Person(Integer id, String name, String sex, Date birthDay) {
        System.out.println(this.getClass().getName() + " Constructor: id=" + id + ", name=" + name);
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.birthDay = birthDay;
    }

    public void init() {
        System.out.println(this.getClass().getName() + " init ...");
    }

    public void destroy() {
        System.out.println(this.getClass().getName() + " destroy ...");
    }

}
